3.88 \(\int \frac {1}{a+c x+b x^2} \, dx\)

Optimal. Leaf size=38 \[ \frac {2 \tan ^{-1}\left (\frac {2 b x+c}{\sqrt {4 a b-c^2}}\right )}{\sqrt {4 a b-c^2}} \]

[Out]

2*arctan((2*b*x+c)/(4*a*b-c^2)^(1/2))/(4*a*b-c^2)^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 38, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {618, 204} \[ \frac {2 \tan ^{-1}\left (\frac {2 b x+c}{\sqrt {4 a b-c^2}}\right )}{\sqrt {4 a b-c^2}} \]

Antiderivative was successfully verified.

[In]

Int[(a + c*x + b*x^2)^(-1),x]

[Out]

(2*ArcTan[(c + 2*b*x)/Sqrt[4*a*b - c^2]])/Sqrt[4*a*b - c^2]

Rule 204

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTan[(Rt[-b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[-b, 2]), x] /
; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rubi steps

\begin {align*} \int \frac {1}{a+c x+b x^2} \, dx &=-\left (2 \operatorname {Subst}\left (\int \frac {1}{-4 a b+c^2-x^2} \, dx,x,c+2 b x\right )\right )\\ &=\frac {2 \tan ^{-1}\left (\frac {c+2 b x}{\sqrt {4 a b-c^2}}\right )}{\sqrt {4 a b-c^2}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 38, normalized size = 1.00 \[ \frac {2 \tan ^{-1}\left (\frac {2 b x+c}{\sqrt {4 a b-c^2}}\right )}{\sqrt {4 a b-c^2}} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + c*x + b*x^2)^(-1),x]

[Out]

(2*ArcTan[(c + 2*b*x)/Sqrt[4*a*b - c^2]])/Sqrt[4*a*b - c^2]

________________________________________________________________________________________

fricas [A]  time = 0.92, size = 113, normalized size = 2.97 \[ \left [-\frac {\sqrt {-4 \, a b + c^{2}} \log \left (\frac {2 \, b^{2} x^{2} + 2 \, b c x - 2 \, a b + c^{2} - \sqrt {-4 \, a b + c^{2}} {\left (2 \, b x + c\right )}}{b x^{2} + c x + a}\right )}{4 \, a b - c^{2}}, -\frac {2 \, \arctan \left (-\frac {2 \, b x + c}{\sqrt {4 \, a b - c^{2}}}\right )}{\sqrt {4 \, a b - c^{2}}}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(b*x^2+c*x+a),x, algorithm="fricas")

[Out]

[-sqrt(-4*a*b + c^2)*log((2*b^2*x^2 + 2*b*c*x - 2*a*b + c^2 - sqrt(-4*a*b + c^2)*(2*b*x + c))/(b*x^2 + c*x + a
))/(4*a*b - c^2), -2*arctan(-(2*b*x + c)/sqrt(4*a*b - c^2))/sqrt(4*a*b - c^2)]

________________________________________________________________________________________

giac [A]  time = 0.43, size = 34, normalized size = 0.89 \[ \frac {2 \, \arctan \left (\frac {2 \, b x + c}{\sqrt {4 \, a b - c^{2}}}\right )}{\sqrt {4 \, a b - c^{2}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(b*x^2+c*x+a),x, algorithm="giac")

[Out]

2*arctan((2*b*x + c)/sqrt(4*a*b - c^2))/sqrt(4*a*b - c^2)

________________________________________________________________________________________

maple [A]  time = 0.06, size = 35, normalized size = 0.92 \[ \frac {2 \arctan \left (\frac {2 b x +c}{\sqrt {4 a b -c^{2}}}\right )}{\sqrt {4 a b -c^{2}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(b*x^2+c*x+a),x)

[Out]

2*arctan((2*b*x+c)/(4*a*b-c^2)^(1/2))/(4*a*b-c^2)^(1/2)

________________________________________________________________________________________

maxima [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(b*x^2+c*x+a),x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(c^2-4*a*b>0)', see `assume?` f
or more details)Is c^2-4*a*b positive or negative?

________________________________________________________________________________________

mupad [B]  time = 0.23, size = 46, normalized size = 1.21 \[ \frac {2\,\mathrm {atan}\left (\frac {c}{\sqrt {4\,a\,b-c^2}}+\frac {2\,b\,x}{\sqrt {4\,a\,b-c^2}}\right )}{\sqrt {4\,a\,b-c^2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(a + c*x + b*x^2),x)

[Out]

(2*atan(c/(4*a*b - c^2)^(1/2) + (2*b*x)/(4*a*b - c^2)^(1/2)))/(4*a*b - c^2)^(1/2)

________________________________________________________________________________________

sympy [B]  time = 0.22, size = 124, normalized size = 3.26 \[ - \sqrt {- \frac {1}{4 a b - c^{2}}} \log {\left (x + \frac {- 4 a b \sqrt {- \frac {1}{4 a b - c^{2}}} + c^{2} \sqrt {- \frac {1}{4 a b - c^{2}}} + c}{2 b} \right )} + \sqrt {- \frac {1}{4 a b - c^{2}}} \log {\left (x + \frac {4 a b \sqrt {- \frac {1}{4 a b - c^{2}}} - c^{2} \sqrt {- \frac {1}{4 a b - c^{2}}} + c}{2 b} \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(b*x**2+c*x+a),x)

[Out]

-sqrt(-1/(4*a*b - c**2))*log(x + (-4*a*b*sqrt(-1/(4*a*b - c**2)) + c**2*sqrt(-1/(4*a*b - c**2)) + c)/(2*b)) +
sqrt(-1/(4*a*b - c**2))*log(x + (4*a*b*sqrt(-1/(4*a*b - c**2)) - c**2*sqrt(-1/(4*a*b - c**2)) + c)/(2*b))

________________________________________________________________________________________